package com.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * Description: 活动状态
 * User: Li_Xiaochi
 * Date: 2025/8/9
 * Time: 14:19
 */
@Getter
@AllArgsConstructor
public enum ActivityStatusEnum {

    RUNNING(1, "活动进行中"),
    COMPLETED(2, "活动已完成");

    private final Integer code;
    private final String message;

    public static ActivityStatusEnum forName(String name) {
        for (ActivityStatusEnum activityStatusEnum : ActivityStatusEnum.values()) {
            if (activityStatusEnum.name().equalsIgnoreCase(name)) {
                return activityStatusEnum;
            }
        }
        return null;
    }
}
